function goback() {
	this.$router.go(-1);
}

function jumpUrl(keywords) {
	if(keywords){
		this.$store.commit('SEARCH_HISTORY', keywords);
		this.$router.push(`/sort?key=${keywords}&sort=click&by=人气`);
	}
}

function historyDel(e) {
	let del_keywords = e.target.dataset.searched;
	this.$store.commit('DEL_SEARCH', del_keywords);
}

function historyClear() {
	this.$store.commit('SEARCH_HISTORY');
}

function getSearchData() {
	if(this.keywords){
		getSearchData(this.keywords).then(res => {
			if(res.status == 200){
				this.searchRes = res.data.data;
			}
		}).then(() => {
			this.tmpSearch = true
		})
	}else{
		this.tmpSearch = false
	}
}

watchKey: debounce(function(){
	this.getSearchData();
},500)